<template>
	<view style="background-color: rgb(247, 250, 253);">
		<uni-section  type="line">
					<uni-list>
						<view @click="jumpNumber">
							<uni-list-item showArrow title="更换手机号码"  class="list" />
						</view>
						<view @click="PasswordNumber">
							<uni-list-item showArrow title="修改密码"  class="list" />
						</view>
						<uni-list-item showArrow title="消息通知"    class="list"/>
						<uni-list-item showArrow  title="清除缓存" :rightText="number"  clickable @click="onClick" class="list"/>
						<uni-list-item showArrow  title="升级版本" class="list" rightText="当前版本2.8.9" />
						<uni-list-item showArrow  title="关于我们" class="list"/>
					</uni-list>
				</uni-section>
				
					<button class="button"  @click="quit('success')" plain>退出账号</button>
				
				
	</view>
</template>

<script setup>
import { ref } from 'vue';

const number =ref('6.23M')

function onClick (){
		uni.showToast({
						title: '清楚成功'
					});
					number.value ="0M"
}



	//修改手机号
function jumpNumber (){
	uni.navigateTo({
		url:"/minePackage/pages/revise-phone/revise-phone"
	})
}	
	//修改密码
	function PasswordNumber (){
		uni.navigateTo({
			url:'/minePackage/pages/revise-password/revise-password'
		})
	}
	
	
	
//退出方法
	function quit (type){
		if (type === 'success') {
		  uni.showModal({
		    
		    content: '确定要退出当前账号吗！',
			 showCancel: true,
			 cancelText: '取消',
		    confirmText: '确定',
		    success: (res) => {
		      if (res.confirm) {
		        console.log('用户点击确定');
				uni.removeStorageSync('user_token')
				uni.reLaunch({
					url:'/pages/login/login'
				})
		      }
		    }
		  });
		}
	}
</script>

<style scoped lang="scss">
.list{
	height: 100rpx;
	color: #333;
	font-size: 32rpx;
	background-color: #fff;
}
.button{
	
	width: 670rpx;
	height: 88rpx;
	margin:50rpx  auto;
	border-radius: 20rpx;
}
</style>
